/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.model;

import com.legendshop.dao.support.GenericEntity;
import com.legendshop.framework.model.GrantedFunction;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.Date;
import java.util.List;


/**
 * LegendShop 版权所有 2009-2011,并保留所有权利。
 * ----------------------------------------------------------------------------
 * 提示：在未取得LegendShop商业授权之前，您不能将本软件应用于商业用途，否则LegendShop将保留追究的权力。
 * ----------------------------------------------------------------------------
 * 官方网站：http://www.legendesign.net
 * ----------------------------------------------------------------------------
 */
public class UserEntity  implements GenericEntity<Long> {
	 
 	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -8401714272377570649L;
     
     /** The id. */
     private Long id;
     
     /** The name. */
     private String name;
     
     /** 真实名字. */     
     private String realName;
     
     /** The password. */
     private String password;
     
     /** The passwordag. */
     private String passwordag;
     
     /** The enabled. */
     private String enabled;
     
     /** The note. */
     private String note;
     
     /** 头像 **/
     private String portraitPic;

     
 	/** 部门Id */
 	private Integer deptId;

	private Date passChangeDate; //密码到期修改时间

	private Date activeTime; //用户有效时间

	private Integer changePass; //是否需要修改密码

 	
 	/** 角色 **/
 	private Collection<GrantedAuthority> roles;
 	
 	/** 权限 **/
 	private List<GrantedFunction> functions;
 	
 	public UserEntity(){
 		
 	}
	
	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	
	/**
	 * Sets the id.
	 * 
	 * @param id
	 *            the new id
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * Gets the name.
	 * 
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Sets the name.
	 * 
	 * @param name
	 *            the new name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Gets the password.
	 * 
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * Sets the password.
	 * 
	 * @param password
	 *            the new password
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * Gets the passwordag.
	 * 
	 * @return the passwordag
	 */
	public String getPasswordag() {
		return passwordag;
	}
	
	/**
	 * Sets the passwordag.
	 * 
	 * @param passwordag
	 *            the new passwordag
	 */
	public void setPasswordag(String passwordag) {
		this.passwordag = passwordag;
	}
	
	/**
	 * Gets the enabled.
	 * 
	 * @return the enabled
	 */
	public String getEnabled() {
		return enabled;
	}
	
	/**
	 * Sets the enabled.
	 * 
	 * @param enabled
	 *            the new enabled
	 */
	public void setEnabled(String enabled) {
		this.enabled = enabled;
	}
	
	/**
	 * Gets the note.
	 * 
	 * @return the note
	 */
	public String getNote() {
		return note;
	}

	public String getPortraitPic() {
		return portraitPic;
	}

	public void setPortraitPic(String portraitPic) {
		this.portraitPic = portraitPic;
	}

	public Integer getDeptId() {
		return deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	public Collection<GrantedAuthority> getRoles() {
		return roles;
	}

	public void setRoles(Collection<GrantedAuthority> roles) {
		this.roles = roles;
	}

	public List<GrantedFunction> getFunctions() {
		return functions;
	}

	public void setFunctions(List<GrantedFunction> functions) {
		this.functions = functions;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}


	public Date getPassChangeDate() {
		return passChangeDate;
	}

	public void setPassChangeDate(Date passChangeDate) {
		this.passChangeDate = passChangeDate;
	}

	public Date getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(Date activeTime) {
		this.activeTime = activeTime;
	}

	public Integer getChangePass() {
		return changePass;
	}

	public void setChangePass(Integer changePass) {
		this.changePass = changePass;
	}
}